<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.6.1.min.js"></script>
    <style>
        #divMove{
            width: 500px;
            height: 500px;
            border: 1px solid red;
        }
    </style>
</head>
<body>
ddd

    <br>
mouse: <span id="mouseMove"></span>

<div id="divMove">
    在这里移动鼠标试试
</div>

<script>
    //当网页元素加载完成之后，响应事件
    $(function(){
        $('#divMove').mousemove(function(e){
            $('#mouseMove').text('x:'+e.pageX + 'y:' +e.pageY)
        })
    });
</script>
</body>
</html>